home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / DiskInit.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  5.4 KB  |  190 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DiskInit.a
  3. ;
  4. ;    Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8.1
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1985-1995, 1997-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DISKINIT__') = 'UNDEFINED' THEN
  19. __DISKINIT__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.  
  25. HFSDefaults                RECORD 0
  26. sigWord                     ds.b    2                ; offset: $0 (0)        ;  signature word 
  27. abSize                     ds.l    1                ; offset: $2 (2)        ;  allocation block size in bytes 
  28. clpSize                     ds.l    1                ; offset: $6 (6)        ;  clump size in bytes 
  29. nxFreeFN                 ds.l    1                ; offset: $A (10)        ;  next free file number 
  30. btClpSize                 ds.l    1                ; offset: $E (14)        ;  B-Tree clump size in bytes 
  31. rsrv1                     ds.w    1                ; offset: $12 (18)        ;  reserved 
  32. rsrv2                     ds.w    1                ; offset: $14 (20)        ;  reserved 
  33. rsrv3                     ds.w    1                ; offset: $16 (22)        ;  reserved 
  34. sizeof                     EQU *                    ; size:   $18 (24)
  35.                         ENDR
  36.  
  37. kHFSPlusDefaultsVersion            EQU        1
  38. HFSPlusDefaults            RECORD 0
  39. version                     ds.w    1                ; offset: $0 (0)        ;  version of this structure 
  40. flags                     ds.w    1                ; offset: $2 (2)        ;  currently undefined; pass zero 
  41. blockSize                 ds.l    1                ; offset: $4 (4)        ;  allocation block size in bytes 
  42. rsrcClumpSize             ds.l    1                ; offset: $8 (8)        ;  clump size for resource forks 
  43. dataClumpSize             ds.l    1                ; offset: $C (12)        ;  clump size for data forks 
  44. nextFreeFileID             ds.l    1                ; offset: $10 (16)        ;  next free file number 
  45. catalogClumpSize         ds.l    1                ; offset: $14 (20)        ;  clump size for catalog B-tree 
  46. catalogNodeSize             ds.l    1                ; offset: $18 (24)        ;  node size for catalog B-tree 
  47. extentsClumpSize         ds.l    1                ; offset: $1C (28)        ;  clump size for extents B-tree 
  48. extentsNodeSize             ds.l    1                ; offset: $20 (32)        ;  node size for extents B-tree 
  49. attributesClumpSize         ds.l    1                ; offset: $24 (36)        ;  clump size for attributes B-tree 
  50. attributesNodeSize         ds.l    1                ; offset: $28 (40)        ;  node size for attributes B-tree 
  51. allocationClumpSize         ds.l    1                ; offset: $2C (44)        ;  clump size for allocation bitmap file 
  52. sizeof                     EQU *                    ; size:   $30 (48)
  53.                         ENDR
  54.  
  55. ;
  56. ; pascal void DILoad(void )
  57. ;
  58.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  59.         Macro
  60.         _DILoad
  61.             moveq               #2,D0
  62.             move.w              D0,-(sp)
  63.             dc.w                $A9E9
  64.         EndM
  65.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  66.         IMPORT_CFM_FUNCTION DILoad
  67.     ENDIF
  68.  
  69. ;
  70. ; pascal void DIUnload(void )
  71. ;
  72.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  73.         Macro
  74.         _DIUnload
  75.             moveq               #4,D0
  76.             move.w              D0,-(sp)
  77.             dc.w                $A9E9
  78.         EndM
  79.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  80.         IMPORT_CFM_FUNCTION DIUnload
  81.     ENDIF
  82.  
  83. ;
  84. ; pascal short DIBadMount(Point where, long evtMessage)
  85. ;
  86.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  87.         Macro
  88.         _DIBadMount
  89.             moveq               #0,D0
  90.             move.w              D0,-(sp)
  91.             dc.w                $A9E9
  92.         EndM
  93.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  94.         IMPORT_CFM_FUNCTION DIBadMount
  95.     ENDIF
  96.  
  97. ;
  98. ; pascal OSErr DIFormat(short drvNum)
  99. ;
  100.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  101.         Macro
  102.         _DIFormat
  103.             moveq               #6,D0
  104.             move.w              D0,-(sp)
  105.             dc.w                $A9E9
  106.         EndM
  107.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  108.         IMPORT_CFM_FUNCTION DIFormat
  109.     ENDIF
  110.  
  111. ;
  112. ; pascal OSErr DIVerify(short drvNum)
  113. ;
  114.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  115.         Macro
  116.         _DIVerify
  117.             moveq               #8,D0
  118.             move.w              D0,-(sp)
  119.             dc.w                $A9E9
  120.         EndM
  121.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  122.         IMPORT_CFM_FUNCTION DIVerify
  123.     ENDIF
  124.  
  125. ;
  126. ; pascal OSErr DIZero(short drvNum, ConstStr255Param volName)
  127. ;
  128.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  129.         Macro
  130.         _DIZero
  131.             moveq               #10,D0
  132.             move.w              D0,-(sp)
  133.             dc.w                $A9E9
  134.         EndM
  135.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  136.         IMPORT_CFM_FUNCTION DIZero
  137.     ENDIF
  138.  
  139. ;    DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  140. ;    FSM is part of Macintosh PC Exchange and System 7.5.
  141. ;
  142.  
  143. ;
  144. ; pascal OSErr DIXFormat(short drvNum, Boolean fmtFlag, unsigned long fmtArg, unsigned long *actSize)
  145. ;
  146.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  147.         Macro
  148.         _DIXFormat
  149.             moveq               #12,D0
  150.             move.w              D0,-(sp)
  151.             dc.w                $A9E9
  152.         EndM
  153.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  154.         IMPORT_CFM_FUNCTION DIXFormat
  155.     ENDIF
  156.  
  157. ;
  158. ; pascal OSErr DIXZero(short drvNum, ConstStr255Param volName, short fsid, short mediaStatus, short volTypeSelector, unsigned long volSize, void *extendedInfoPtr)
  159. ;
  160.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  161.         Macro
  162.         _DIXZero
  163.             moveq               #14,D0
  164.             move.w              D0,-(sp)
  165.             dc.w                $A9E9
  166.         EndM
  167.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  168.         IMPORT_CFM_FUNCTION DIXZero
  169.     ENDIF
  170.  
  171. ;
  172. ; pascal OSErr DIReformat(short drvNum, short fsid, ConstStr255Param volName, ConstStr255Param msgText)
  173. ;
  174.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  175.         Macro
  176.         _DIReformat
  177.             moveq               #16,D0
  178.             move.w              D0,-(sp)
  179.             dc.w                $A9E9
  180.         EndM
  181.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  182.         IMPORT_CFM_FUNCTION DIReformat
  183.     ENDIF
  184.  
  185.  
  186.  
  187.     ENDIF ; __DISKINIT__ 
  188.  
  189.